﻿using Furion;
using Gear.ToolKits.Helper;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gear.ORM.Core
{
    public static class ORMTool
    {
        public static List<ConnectionConfig> SqlSugarConnectionConfigs()
        {
            List<ConnectionConfig> connectConfigList = new List<ConnectionConfig>();

            //var configStr = App.Configuration["SqlSugar"];

            //connectConfigList = JsonHelper.DeserializeJSON<List<ConnectionConfig>>(configStr);

            //数据库1
            connectConfigList.Add(new ConnectionConfig
            {
                ConnectionString = "server=47.108.238.160;port=3306;database=gearadmin;user=gear;password=connection;sslMode=None",
                DbType = DbType.MySql,
                IsAutoCloseConnection = true,
                InitKeyType = InitKeyType.SystemTable,
                ConfigId = "0"
            });

            return connectConfigList;
        }
    }
}
